<?php
/**
 * Created by Chongyi
 * Date: 2015/10/8 0008
 * Time: 下午 3:16
 */

namespace App\B2BProject\Admin;


trait AdminControllerBuildTrait
{
    protected function buildModuleVariable()
    {
        view()->share('moduleName', isset($this->moduleName) ? $this->moduleName : '');
        view()->share('subModuleName', isset($this->subModuleName) ? $this->subModuleName : []);

        // 无限级导航
        $navs = AdminPanelNav::where('parent_id', '=', 0)->get();
        view()->share('navs', $navs);
    }
}